<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>DOM元素</title>
  <script src="./libs/jquery-3.2.1.min.js"></script>
  <script>
	$(document).ready(function(){
		var foo = document.getElementById("foo");
		foo.innerHTML = "Foo DOM";
		
		var items = document.getElementsByTagName("p");
		console.log(items.length);
		for (var i=0; i<items.length; ++i){
			items[i].innerHTML += " DOM";
		}
	});
  </script>
</head>
<body>
	<h2>DOM元素</h2>
	<p id="foo">Foo</p>
    <p id="bar">Bar</p>
</body>
</html>